package com.mine.yyb.common.utils.email;

/**
 * 
 * <一句话功能简述>
 * 邮件服务配置信息类
 * <功能详细描述>
 * 
 * @author  xiongwei
 * @version  [版本号, 2015年6月22日]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public class MineEmailConfig
{
    /** 发送邮件的服务器的IP(或主机地址) */
    private  String mailServerHost;
    
    /** 发送邮件的服务器的端口 */
    private  String mailServerPort;
    
    /** 发件人邮箱地址 */
    private  String senderAddress;
    
    /** 是否需要身份验证 */
    private  boolean validate;
    
    /** 登陆邮件发送服务器的用户名 */
    private  String userName;
    
    /** 登陆邮件发送服务器的密码 */
    private  String password;

    /**
     * 获取 mailServerHost
     * @return 返回 mailServerHost
     */
    public String getMailServerHost()
    {
        return mailServerHost;
    }

    /**
     * 设置 mailServerHost
     * @param 对mailServerHost进行赋值
     */
    public void setMailServerHost(String mailServerHost)
    {
        this.mailServerHost = mailServerHost;
    }

    /**
     * 获取 mailServerPort
     * @return 返回 mailServerPort
     */
    public String getMailServerPort()
    {
        return mailServerPort;
    }

    /**
     * 设置 mailServerPort
     * @param 对mailServerPort进行赋值
     */
    public void setMailServerPort(String mailServerPort)
    {
        this.mailServerPort = mailServerPort;
    }

    /**
     * 获取 senderAddress
     * @return 返回 senderAddress
     */
    public String getSenderAddress()
    {
        return senderAddress;
    }

    /**
     * 设置 senderAddress
     * @param 对senderAddress进行赋值
     */
    public void setSenderAddress(String senderAddress)
    {
        this.senderAddress = senderAddress;
    }

    /**
     * 获取 validate
     * @return 返回 validate
     */
    public boolean isValidate()
    {
        return validate;
    }

    /**
     * 设置 validate
     * @param 对isValidate进行赋值
     */
    public void setValidate(boolean isValidate)
    {
        this.validate = isValidate;
    }

    /**
     * 获取 userName
     * @return 返回 userName
     */
    public String getUserName()
    {
        return userName;
    }

    /**
     * 设置 userName
     * @param 对userName进行赋值
     */
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    /**
     * 获取 password
     * @return 返回 password
     */
    public String getPassword()
    {
        return password;
    }

    /**
     * 设置 password
     * @param 对password进行赋值
     */
    public void setPassword(String password)
    {
        this.password = password;
    }

    /**
     * 重载方法
     * @return
     */
    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((mailServerHost == null) ? 0 : mailServerHost.hashCode());
        result = prime * result + ((mailServerPort == null) ? 0 : mailServerPort.hashCode());
        result = prime * result + ((password == null) ? 0 : password.hashCode());
        result = prime * result + ((senderAddress == null) ? 0 : senderAddress.hashCode());
        result = prime * result + ((userName == null) ? 0 : userName.hashCode());
        result = prime * result + (validate ? 1231 : 1237);
        return result;
    }

    /**
     * 重载方法
     * @param obj
     * @return
     */
    @Override
    public boolean equals(Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        MineEmailConfig other = (MineEmailConfig)obj;
        if (mailServerHost == null)
        {
            if (other.mailServerHost != null)
                return false;
        }
        else if (!mailServerHost.equals(other.mailServerHost))
            return false;
        if (mailServerPort == null)
        {
            if (other.mailServerPort != null)
                return false;
        }
        else if (!mailServerPort.equals(other.mailServerPort))
            return false;
        if (password == null)
        {
            if (other.password != null)
                return false;
        }
        else if (!password.equals(other.password))
            return false;
        if (senderAddress == null)
        {
            if (other.senderAddress != null)
                return false;
        }
        else if (!senderAddress.equals(other.senderAddress))
            return false;
        if (userName == null)
        {
            if (other.userName != null)
                return false;
        }
        else if (!userName.equals(other.userName))
            return false;
        if (validate != other.validate)
            return false;
        return true;
    }

    /**
     * 重载方法
     * @return
     */
    @Override
    public String toString()
    {
        return "MineEmailConfig [mailServerHost=" + mailServerHost + ", mailServerPort=" + mailServerPort
            + ", senderAddress=" + senderAddress + ", validate=" + validate + ", userName=" + userName + ", password="
            + password + "]";
    }
    
    
    
}
